/*
 * @Author: pengtianrui 2276608413@qq.com
 * @Date: 2024-08-22 16:48:30
 * @LastEditors: 武兴创 superjava@vip.qq.com
 * @LastEditTime: 2024-08-28 17:38:54
 * @FilePath: \SGFEM\DataStructure\FEM\Load\src\GRAVData .cpp
 */

#include "DataStructure/Common/Validation.h"
#include "DataStructure/Input/Load/GRAVData.h"

bool SG::DataStructure::FEM::operator== (const GRAVData& lhs, const GRAVData& rhs)
{
    if (lhs.m_sId != rhs.m_sId)
    {
        return false;
    }
    if (lhs.m_cId != rhs.m_cId)
    {
        return false;
    }
    if (!SG::DataStructure::Common::isNear (lhs.m_a, rhs.m_a))
    {
        return false;
    }
    for (int i = 0; i < 3; ++i)
    {
        if (lhs.m_N[i] != rhs.m_N[i])
        {
            return false;
        }
    }
    if (lhs.m_MB != rhs.m_MB)
    {
        return false;
    }
    if (lhs.m_domainId != rhs.m_domainId)
    {
        return false;
    }
    return true;
}

bool SG::DataStructure::FEM::operator< (const GRAVData& SGDataA, const GRAVData& SGDataB)
{
    return SGDataA.m_sId < SGDataB.m_sId;
}
